@REM ***SETUP Arduino as programmer***
@rem "C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p atmega328p -c avr109 -P COM8 -b 19200 -u -v -v -v -v -U flash:w:ArduinoISP.cpp.hex

@REM ***Upload to Micromouse***
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -c avrisp -p m32u4 -P COM8 -b 19200 -v -v -v -v -U flash:w:debug\CoreC.hex

@if NOT ["%errorlevel%"]==["0"] (
    @echo *** An Error Occured!! ***
	@REM pause 
    exit /b %errorlevel%
)